package br.com.felipeab.dexter.bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import br.com.felipeab.dexter.bo.PersistenceService;
import br.com.felipeab.dexter.domain.ServiceOrder;
import br.com.felipeab.dexter.faces.CrudController;

/**
 * Classe AccompanimentBean
 * 
 * @author Felipe A. Braga <br>
 *         18/06/2012 03:32:14<br>
 * 
 */
@ViewScoped
@ManagedBean(name = "accompBean")
public class AccompanimentBean extends CrudController<ServiceOrder> {

	private static final long serialVersionUID = -1270601227220683489L;

	private ServiceOrder domain;
	private PersistenceService persistenceService;

	@Override
	protected PersistenceService getPersistenceService() {
		if (persistenceService == null) {
			persistenceService = new PersistenceService();
		}
		return persistenceService;
	}

	@Override
	public ServiceOrder getDomain() {
		if (domain == null) {
			domain = new ServiceOrder();
		}
		return domain;
	}

	@Override
	public void setDomain(ServiceOrder domain) {
		this.domain = domain;
	}

}
